﻿@using Entities;
@model WebUI.Areas.Bots.Models.NotificationSetting
@{
    Layout = MVC.Bots.Shared.Views._Main;
}
@section Title{@WebUI.Resources.Notifications}
@section PageName{@WebUI.Resources.Notifications}
<div class="filter_bar">
    @using (Ajax.BeginForm(MVC.Bots.Notifications.AddRecepient(), new AjaxOptions { HttpMethod = HttpVerbs.Post.ToString(), UpdateTargetId = "Recipients" }))
    {
        @Html.ValidationSummary(false)
        <h3>
            Bot Recepients</h3>
        @Html.LabelFor(m => m.BotRecipient.RecipientName)
        @Html.EditorFor(m => m.BotRecipient.RecipientName)
        @Html.ValidationMessageFor(m => m.BotRecipient.RecipientName)
        @Html.LabelFor(m => m.BotRecipient.RecipientEmail)
        @Html.EditorFor(m => m.BotRecipient.RecipientEmail)
        @Html.ValidationMessageFor(m => m.BotRecipient.RecipientEmail)
        <input type="submit" value='@WebUI.Resources.Add' />
 
    }
    <div id="Recipients">
        @{Html.RenderPartial(MVC.Bots.Notifications.Views._recepients, Model.Recepients);}
    </div>
</div>
@using (Html.BeginForm(MVC.Bots.Notifications.Save()))
{
    <div class="filter_bar">
        <h3>
            Notification Setting</h3>
        <p>
            Notification Type:</p>
        @Html.RadioButtonFor(r => r.NotificationType, (int)BotNotification.MatchesFound)<span>Matches
            Found</span>
        @Html.RadioButtonFor(r => r.NotificationType, (int)BotNotification.MatchesNotFound)<span>Matches
            Not Found</span>
        @Html.RadioButtonFor(r => r.NotificationType, (int)BotNotification.All)<span>All</span>
    </div>
    @Html.ActionLink(WebUI.Resources.Previous, MVC.Bots.UsersAndMachines.Index(), new { @class = "prev btn" })
    <input type="submit" class="next btn" value='@WebUI.Resources.Save' />
}